<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="../../../static/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../../static/js/jquery.js"></script>
</head>
<script>
  $(function () {
    var uId = JSON.parse(localStorage.getItem("sysuid1"));
    console.log(uId)
    $.ajax({
      type: "post",
      url: "/users/userDetail",
      data: {uId: uId},
      dataType: "JSON",
      success: function (rm) {
        $("#uId").html(rm.data.uid);
        $("#uname").html(rm.data.uname);
        $("#utelephone").html(rm.data.utelephone);

        let gender;
        if (rm.data.sex == 1) {
          gender = '男';
        } else{
          gender = '女';
        }
        $("#sex").html(gender);
        $("#birthday").html(rm.data.birthday);
        $("#deptName").html(rm.data.deptName);
        $("#jobName").html(rm.data.jobName);

        let status;
        if (rm.data.statusId == 1) {
          status = "在职";
        }else{
          status = "离职";
        }
        $("#statusId").html(status);
        $("#hiredate").html(rm.data.hiredate);
      }
    })
  })
</script>
<body>
<div class="place"> <span>位置：</span>
  <ul class="placeul">
    <li><a href="findByPage">系统管理</a></li>
    <li><a href="findByPage">用户管理</a></li>
    <li><a href="userView">员工详细信息</a></li>
  </ul>
</div>
<div class="formbody">
  <div class="formtitle"><span>员工信息</span></div>
  <ul class="forminfo">
    <li>
      <label>员工编号</label>
      <cite id="uId">9527</cite>
    </li>
    <li>
      <label>员工姓名</label>
      <cite id="uname">唐寅</cite>
    </li>
    <li>
      <label>联系电话</label>
      <cite id="utelephone">17370899727</cite>
    </li>
    <li>
      <label>性别</label>
      <cite id="sex">男</cite>
    </li>
    <li>
      <label>出生年月</label>
       <cite id="birthday">2000-05-02</cite>
    </li>
    <li>
      <label>部门</label>
      <cite id="deptName">研发部</cite>
    </li>
    <li>
      <label>职位</label>
      <cite id="jobName">经理</cite>
    </li>
    <li>
      <label>状态</label>
      <cite id="statusId">在职</cite>
    </li>
    <li>
      <label>入职时间</label>
      <cite id="hiredate">2017-01-30 12:05:05</cite>
    </li>
  </ul>
  <div style="margin-top:20px; margin-left:20px;">
  <input name="" type="button" class="btn" value="返回" onclick="window.history.go(-1);"/>
  </div>
</div>
<script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
</script>
</body>
